import Vue from 'vue'
import FastClick from 'fastclick'
import VueRouter from 'vue-router'
import App from './App'
import Login from './components/Login'
import Index from './components/student/Index.student.vue'
import Bdydj from './components/student/Bdydj'
import Bszn from './components/student/Bszn'
import BsznDetail from './components/student/Bszn.detail.vue'
import Txl from './components/student/Txl'
import Grxx from './components/student/Grxx'
import Jtxx from './components/student/Jtxx'
import Wdjfd from './components/student/Wdjfd'
import IndexTeacher from './components/teacher/Index.teacher'
import Dwsz from './components/teacher/dwsz'
import Blsx from './components/teacher/blsx'
import Cxtj from './components/teacher/cxtj'

Vue.use(VueRouter)

const routes = [{
  path: '/',
  component: Login
}, {
  path: '/login/:loginName',
  component: Login
}, {
  path: '/index',
  component: Index
}, {
  path: '/bdydj',
  component: Bdydj
}, {
  path: '/bszn',
  component: Bszn,
  children: [
    {
      path: 'detail/:id',
      component: BsznDetail
    }
  ]
}, {
  path: '/txl',
  component: Txl
}, {
  path: '/grxx',
  component: Grxx
}, {
  path: '/jtxx',
  component: Jtxx
}, {
  path: '/wdjfd',
  component: Wdjfd
}, {
  path: '/dwsz',
  component: Dwsz
}, {
  path: '/blsx',
  component: Blsx
}, {
  path: '/cxtj',
  component: Cxtj
}, {
  path: '/index_teacher',
  component: IndexTeacher
}]

const router = new VueRouter({
  routes
})

FastClick.attach(document.body)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  router,
  render: h => h(App)
}).$mount('#app-box')
